#!/usr/bin/env python
# -*- coding:utf-8 -*-

# 返回None表示均有重复或元素为空
def find_first_unduplicated_number(l):
	size = len(l)
	if 0 == size:
		return None

	flags = {}
	for n in l:
		if -1 == flags.get(n, -1):
			flags[n] = 0
		else:
			flags[n] = 1

	for n in l:
		if 1 != flags[n]:
			return n

	return None


def main():
	l = [1, 3, 5, 1, 5, 7, 7, 8, 2, -1, 0, 10, 100]
	print find_first_unduplicated_number(l)

	l = [1, 3, 5, 5, 3, 1, 7, 2, 2, 1, 1, 0, 7, 0]
	print find_first_unduplicated_number(l)


if __name__ == '__main__':
	main()